﻿namespace ZLWeb.WebApiEntity
{
    public class ResponseResultInfo : Identity
    {
        private bool _issuccess = false;

        /// <summary>
        ///     错误备注
        /// </summary>
        public string description { get; set; }

        /// <summary>
        ///     错误号
        /// </summary>
        public string number { get; set; }

        /// <summary>
        ///     错误类型
        /// </summary>
        public string type { get; set; }

        /// <summary>
        ///     错误Model
        /// </summary>
        public ErrorModel errormodel { get; set; }

        /// <summary>
        ///     HTTP错误码
        /// </summary>
        public int httpcode { get; set; }

        /// <summary>
        /// 是否已经提交
        /// </summary>
        public bool hascommit { get; set; }

        /// <summary>
        ///     是否成功
        /// </summary>
        public bool IsSuccess
        {
            get
            {
                if (errormodel != null) return false;
                if (description != null) return false;
                if (httpcode != 200) return false;

                return true;
            }
        }
    }
}